Platform Mocking 您所在的位置:网站首页 linux kernel api reference Platform Mocking

Platform Mocking

2023-07-12 19:20| 来源: 网络整理| 查看: 265

API露 struct device_node *of_fake_node(struct test *test, const char *name)露

Parameters

struct test *test

the test to associate node with

const char *name

name of the node

Description

The struct device_node returned is allocated as a root node with the given name and otherwise behaves as a real struct device_node.

Return

the faked struct device_node

struct platform_device *of_fake_probe_platform(struct test *test, struct platform_driver *driver, const char *node_name)露

Parameters

struct test *test

the test to associate the fake platform device with

struct platform_driver *driver

driver to probe

const char *node_name

name of the device node created

Description

Creates a struct platform_device and an associated struct device_node, probes the provided struct platform_driver with the struct platform_device.

Return

the struct platform_device that was created

struct platform_device *of_fake_probe_platform_by_name(struct test *test, const char *driver_name, const char *node_name)露

Parameters

struct test *test

the test to associate the fake platform device with

const char *driver_name

name of the driver to probe

const char *node_name

name of the device node created

Description

Same as of_fake_probe_platform() but looks up the struct platform_driver by the provided name.

Return

the struct platform_device that was created



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有